<!DOCTYPE html>
<html lang="en">
<head>  
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="../css/index.css">
</head>

<body>
    <div class="top">
        <div class="center">
            <img src="../images/01.jpg" alt="">
            <ul>
                <li><a href="./reg.html">注册</a></li>
                <li><a href="JavaScript:;" name="login" role="button">登录</a></li>
                <li><a href="JavaScript:;" name="logout" >退出登录</a></li>
                <li><a name="cart" role="button" >购物车</a></li>
                <li>关于我们</li>
            </ul>
        </div>
    </div>
    <div class="banner">
        <div class="center">
            <ul class="clear"></ul>
            <ol></ol>
            <div>
                <a href="JavaScript:;" name="left">&lt;</a>
                <a href="JavaScript:;" name="right">&gt;</a>
            </div>
        </div>
    </div>
    <div class="content">
        <div class="nav-top">
            <div class="center">
                <ul>
                    <li><a href="./list.html?cat_one_id=食品酒水" role="button">食品酒水</a></li>
                    <li><a href="./list.html?cat_one_id=童装玩具" role="button">童装玩具</a></li>
                    <li><a href="./list.html?cat_one_id=家装建材" role="button">家装建材</a></li>
                    <li><a href="./list.html?cat_one_id=奶粉尿裤" role="button">奶粉尿裤</a></li>
                    <li><a href="./list.html?cat_one_id=大家电" role="button">大家电</a></li>
                    <li><a href="./list.html?cat_one_id=海外购" role="button">海外购</a></li>
                    <li><a href="./list.html?cat_one_id=其他" role="button">其他产品</a></li>
                </ul>
            </div>
        </div>
        <div class="nav-content1">
            <div class="center">
                <div class="ctr-nav">
                    <h1><a class="item-class-id " href="./list.html?cat_one_id=食品酒水" role="button">食品酒水</a></h1>
                </div>
                <div class="ctr-btm">
                    <div class="btm-l list1">
                        <!-- <div class="l-top">
                            <div class="top-l">
                                <img src="https://image2.suning.cn/uimg/b2c/newcatentries/0010128947-000000000838002452_1_800x800.jpg" alt="">
                            </div>
                            <div class="top-r">
                                <div class="r">
                                    <div class="text">
                                        <p class="pp">雀巢咖啡 1+2原味 1.5kg (100条x15g)</p>
                                    </div>
                                    <div class="img">
                                        <img src="https://image3.suning.cn/uimg/b2c/newcatentries/0000000000-000000000124090816_1_800x800.jpg" alt="">
                                    </div>
                                </div>
                                <div class="r">
                                    <div class="text">
                                        <p class="pp">雀巢咖啡 1+2原味 1.5kg (100条x15g)</p>
                                    </div>
                                    <div class="img">
                                        <img src="https://image4.suning.cn/uimg/b2c/newcatentries/0070138690-000000000172307251_1_800x800.jpg" alt="">
                                    </div>
                                </div>
                                <div class="r">
                                    <div class="text">
                                        <p class="pp">雀巢咖啡 1+2原味 1.5kg (100条x15g)</p>
                                    </div>
                                    <div class="img">
                                        <img src="https://image5.suning.cn/uimg/b2c/newcatentries/0000000000-000000000104618683_1_800x800.jpg" alt="">
                                    </div>
                                </div>
                                <div class="r">
                                    <div class="text">
                                        <p class="pp">雀巢咖啡 1+2原味 1.5kg (100条x15g)</p>
                                    </div>
                                    <div class="img">
                                        <img src="https://image2.suning.cn/uimg/b2c/newcatentries/0000000000-000000000139218884_1_800x800.jpg" alt="">
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="l-btm">
                            <div class="btm-img">
                                <img src="https://image3.suning.cn/uimg/b2c/newcatentries/0070146523-000000000701966771_1_800x800.jpg" alt="">
                            </div>
                            <div class="btm-img">
                                <img src="https://image3.suning.cn/uimg/b2c/newcatentries/0000000000-000000000174748689_1_800x800.jpg" alt="">
                            </div>
                            <div class="btm-img">
                                <img src="https://image3.suning.cn/uimg/b2c/newcatentries/0000000000-000000000163703087_1_800x800.jpg" alt="">
                            </div>
                        </div> -->
                    </div>
                    
                    <div class="btm-r list2">
                        <!-- <div class="l-top">
                            <div class="top-l">
                                <img src="https://image2.suning.cn/uimg/b2c/newcatentries/0010128947-000000000838002452_1_800x800.jpg" alt="">
                            </div>
                            <div class="top-r">
                                <div class="r">
                                    <div class="text">
                                        <p class="pp">雀巢咖啡 1+2原味 1.5kg (100条x15g)</p>
                                    </div>
                                    <div class="img">
                                        <img src="https://image3.suning.cn/uimg/b2c/newcatentries/0000000000-000000000124090816_1_800x800.jpg" alt="">
                                    </div>
                                </div>
                                <div class="r">
                                    <div class="text">
                                        <p class="pp">雀巢咖啡 1+2原味 1.5kg (100条x15g)</p>
                                    </div>
                                    <div class="img">
                                        <img src="https://image4.suning.cn/uimg/b2c/newcatentries/0070138690-000000000172307251_1_800x800.jpg" alt="">
                                    </div>
                                </div>
                                <div class="r">
                                    <div class="text">
                                        <p class="pp">雀巢咖啡 1+2原味 1.5kg (100条x15g)</p>
                                    </div>
                                    <div class="img">
                                        <img src="https://image5.suning.cn/uimg/b2c/newcatentries/0000000000-000000000104618683_1_800x800.jpg" alt="">
                                    </div>
                                </div>
                                <div class="r">
                                    <div class="text">
                                        <p class="pp">雀巢咖啡 1+2原味 1.5kg (100条x15g)</p>
                                    </div>
                                    <div class="img">
                                        <img src="https://image2.suning.cn/uimg/b2c/newcatentries/0000000000-000000000139218884_1_800x800.jpg" alt="">
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="l-btm">
                            <div class="btm-img">
                                <img src="https://image3.suning.cn/uimg/b2c/newcatentries/0070146523-000000000701966771_1_800x800.jpg" alt="">
                            </div>
                            <div class="btm-img">
                                <img src="https://image3.suning.cn/uimg/b2c/newcatentries/0000000000-000000000174748689_1_800x800.jpg" alt="">
                            </div>
                            <div class="btm-img">
                                <img src="https://image3.suning.cn/uimg/b2c/newcatentries/0000000000-000000000163703087_1_800x800.jpg" alt="">
                            </div>
                        </div> -->
                    </div>
                </div>
            </div>
        </div>

    </div>
    <div class="buttom">
       <div class="center">
        <div class="clearfix"></div>
        <div class="icon-row">
          <div class="footer-icon">
            <h5 class="footer-icon-child"></h5>
            <span class="footer-icon-text">品类齐全，轻松购物</span>
          </div>
          <div class="footer-icon">
            <h5 class="footer-icon-child footer-icon-child-2"></h5>
            <span class="footer-icon-text">多仓直发，极速配送</span>
          </div>
          <div class="footer-icon">
            <h5 class="footer-icon-child footer-icon-child-3"></h5>
            <span class="footer-icon-text">正品行货，精致服务</span>
          </div>
          <div class="footer-icon">
            <h5 class="footer-icon-child footer-icon-child-4"></h5>
            <span class="footer-icon-text">天天低价，畅选无忧</span>
          </div>
        </div>
        <div class="service-intro">
          <div class="servece-type">
            <div class="servece-type-info">
              <ul>
                <li>购物指南</li>
                <li>购物流程</li>
                <li>会员介绍</li>
                <li>生活旅行</li>
                <li>常见问题</li>
                <li>大家电</li>
                <li>联系客服</li>
              </ul>
            </div>
            <div class="servece-type-info">
              <ul>
                <li>配送方式</li>
                <li>上门自提</li>
                <li>211限时达</li>
                <li>配送服务查询</li>
                <li>配送费收取标准</li>
                <li>海外配送</li>
              </ul>
            </div>
            <div class="servece-type-info">
              <ul>
                <li>支付方式</li>
                <li>货到付款</li>
                <li>在线支付</li>
                <li>分期付款</li>
                <li>邮局汇款</li>
                <li>公司转账</li>
              </ul>
            </div>
            <div class="servece-type-info">
              <ul>
                <li>售后服务</li>
                <li>售后政策</li>
                <li>价格保护</li>
                <li>退款说明</li>
                <li>返修/退换货</li>
                <li>取消订单</li>
              </ul>
            </div>
          </div>
          <div class="clearfix"></div>
          <div class="friend-link">
            <div class="center">
                <ul>
                    <li><span class="link-item">关于我们</span></li>
                    <li><span class="link-item">联系我们</span></li>
                    <li><span class="link-item">联系客服</span></li>
                    <li><span class="link-item">合作招商</span></li>
                    <li><span class="link-item">商家帮助</span></li>
                    <li><span class="link-item">营销中心</span></li>
                    <li><span class="link-item">销售联盟</span></li>
                    <li><span class="link-item">校园社区</span></li>
                    <li><span class="link-item">风险监测</span></li>
                    <li><span class="link-item link-last-item">隐私政策</span></li>
                  </ul>
            </div>
          </div>
          <div class="clearfix"></div>
        </div>
       </div>       
    </div>
    <div class="footer">
        <p>Copyright © 2021 BY Li-Jincheng</p>
    </div>
    <script src="../js/jquery.min.js"></script>
    <script src="../js/cookie.js"></script>
    <script src="../js/tools.js"></script>
    <script src="../js/index.js"></script>
    <script src="../js/index_list.js"></script>
    <script>
        const imgArr=[
            {id:1,width:1200,height:400,name:'banner1.jpg'},
            {id:2,width:1200,height:400,name:'banner2.jpg'},
            {id:3,width:1200,height:400,name:'banner3.jpg'},
            {id:4,width:1200,height:400,name:'banner4.jpg'},
            {id:5,width:1200,height:400,name:'banner5.png'},
        ];
        const oBanner = document.querySelector('.banner');
        const bannerObj = new setBanner(oBanner , imgArr);
        bannerObj.init();

        $('[name = "login" ]').click(function(){
            window.location.href = `./login.html?url=${window.location.href}`;
        })

        $('[name="logout"]').click(function(){
            const cookieObj = myGetCookie();

            if(cookieObj.login === '1'){
                mySetCookie('login', 0 , -1 , '/');
                window.alert('您已经退出登录了');
            }else{
                window.alert('您还没有登录,请您先登录');
            }
        });


        $('[name="cart"]').click(() => {
          let obj = myGetCookie();
          if (obj.login === undefined) {
            window.alert('请先登录才能进入购物车');
            window.location.href = `./login.html?url=${window.location.href}`;
          } else {
            window.location.href = './cart.html';
          }
        })
    </script>
</body>

</html>